#include <bits/stdc++.h>
using namespace std;
int n, w[2010], sum[2010];
int ans = -0x3f3f3f3f;

int main()
{

	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> w[i];
		sum[i] = sum[i - 1] ^ w[i];
	}
	for (int i = 1; i <= n; i++)
		for (int j = 1; j <= i; j++)
			ans = max(ans, sum[i] ^ sum[j - 1]);

	cout << ans;
	return 0;
}